package com.hzncc.flowable_diboot.vo.contract;

import com.diboot.core.binding.annotation.BindDict;
import com.diboot.core.binding.annotation.BindField;
import com.diboot.core.vo.LabelValue;
import com.diboot.iam.entity.IamUser;
import com.hzncc.flowable_diboot.entity.contract.Contract;
import lombok.Data;
import lombok.EqualsAndHashCode;

@EqualsAndHashCode(callSuper = true)
@Data
public class ContractListVO extends Contract {

    /**
     * 产品类型 关联字典选项
     */
    @BindDict(
            type = "contractProductType",
            field = "productType"
    )
    private LabelValue productTypeLabel;

    @BindField(
            entity = IamUser.class,
            field = "realname",
            condition = "this.saler = id"
    )
    private String salerName;

    @BindField(
            entity = IamUser.class,
            field = "realname",
            condition = "this.header = id"
    )
    private String headerName;

    @BindField(
            entity = IamUser.class,
            field = "realname",
            condition = "this.signer = id"
    )
    private String signerName;

    @BindDict(
            type = "contractStatus",
            field = "contractStatus"
    )
    private String contractStatusLabel;

}
